QuickTime 3 Reference

Previous | Chapter Top | Chapter Contents | Next

Saving Image Files

Graphics import components can save data in two formats: QuickDraw pictures and QuickTime image files. This capability is only needed by applications that perform file format translation. Applications that only wish to draw the image can use the GraphicsImportDraw function.

GraphicsImportSaveAsPicture

Creates a QuickDraw picture file.

extern pascal ComponentResult GraphicsImportSaveAsPicture (
                     GraphicsImportComponent ci,
                     const FSSpec *fss,
                     ScriptCode scriptTag);
ci
Specifies the component instance that identifies your connection to the graphics importer component.
fss
A pointer to the file that is to receive the image.
scriptTag
Specifies the script system in which the file name is to be displayed. If you have established the name and location of the file using one of the Standard File Package functions, use the script code returned in the reply record ( reply.sfScript ). Otherwise, specify the system script by setting the scriptTag parameter to the value smSystemScript . See Inside Macintosh: Files for more information about script specification.

DISCUSSION

This function creates a new QuickDraw picture file containing the image currently in use by the graphics import component. If possible, the image will remain in the compressed format. For example, if the image is from a JFIF file, the picture will contain compressed JPEG data.

RESULT CODES

noErr

0

No error

paramErr

-50

Invalid parameter specified

memFullErr

-108

Not enough memory available

GraphicsImportSaveAsQuickTimeImageFile

Creates a QuickTime image file.

extern pascal ComponentResult GraphicsImportSaveAsQuickTimeImageFile (
                     GraphicsImportComponent ci,
                     const FSSpec *fss,
                     ScriptCode scriptTag);
ci
Specifies the component instance that identifies your connection to the graphics importer component.
fss
A pointer to the file that is to receive the image.
scriptTag
Specifies the script system in which the file name is to be displayed. If you have established the name and location of the file using one of the Standard File Package functions, use the script code returned in the reply record ( reply.sfScript ). Otherwise, specify the system script by setting the scriptTag parameter to the value smSystemScript . See Inside Macintosh: Files for more information about script specification.

DISCUSSION

This function creates a new QuickTime image file containing the image currently in use by the graphics import component. If possible, the image will remain in the compressed format. For example, if the image is from a JFIF file, the QuickTime image file will contain compressed JPEG data.

RESULT CODES

noErr

0

No error

paramErr

-50

Invalid parameter specified

memFullErr

-108

Not enough memory available


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next